package com.hup.minicontroller.common.model.dto;

import android.view.MotionEvent;

import com.hup.minicontroller.common.bluetooth.model.BaseBtDataPacket;
import com.hup.minicontroller.common.constant.NetConstant.DataType;
import com.hup.minicontroller.common.netty.model.BaseDataPacket;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 全屏触摸事件
 *
 * @author hugan
 * @date 2021/5/7
 */
@Data
@NoArgsConstructor
public class FullScreenTouchRequest implements BaseDataPacket, BaseBtDataPacket {

    /**
     * {@link MotionEvent#getAction()}
     */
    private int action;
    /**
     * 坐标位置百分比
     */
    private float xPercent;
    /**
     * 坐标位置百分比
     */
    private float yPercent;

    public FullScreenTouchRequest(int action, float xPercent, float yPercent) {
        this.action = action;
        this.xPercent = xPercent;
        this.yPercent = yPercent;
    }

    @Override
    public int getType() {
        return DataType.FULL_SCREEN_TOUCH;
    }
}
